﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;

namespace AiXiu.WebSite.Handler
{
    /// <summary>
    /// YZM 的摘要说明
    /// </summary>
    public class YZM : IHttpHandler, IReadOnlySessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            if (context.Session["yzm"].ToString().Equals(context.Request["yzm"]))
            {
                context.Response.Write(JsonConvert.SerializeObject(true));
            }
            else
            {
                context.Response.Write(JsonConvert.SerializeObject(false));
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}